package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.UserDealRecordMapper;
import com.jsb.model.UserDealRecord;
import com.jsb.model.UserDealRecordExample;

@Service
public class UserDealRecordService{
	
	@Resource
	private UserDealRecordMapper userDealRecordMapper;
	
	public void addUserDealRecord(UserDealRecord userDealRecord) {
		userDealRecordMapper.insertSelective(userDealRecord);
	}
	
	public void delUserDealRecordByUuid(String uuid) {
		userDealRecordMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateUserDealRecord(UserDealRecord userDealRecord) {
		userDealRecordMapper.updateByPrimaryKeySelective(userDealRecord);
	}
	
	public void updateUserDealRecordByExample(UserDealRecord userDealRecord,UserDealRecordExample userDealRecordExample){
	    userDealRecordMapper.updateByExampleSelective(userDealRecord,userDealRecordExample);
	}
	
	public UserDealRecord getUserDealRecordByUuid(String uuid) {
		return userDealRecordMapper.selectByPrimaryKey(uuid);
	}
	
	public List<UserDealRecord> getPageUserDealRecord(UserDealRecordExample userDealRecordExample) {
		return userDealRecordMapper.selectPage(userDealRecordExample);
	}
	
	public int countUserDealRecord(UserDealRecordExample userDealRecordExample) {
		return userDealRecordMapper.countByExample(userDealRecordExample);
	}
	
	public List<UserDealRecord> selectByExample(UserDealRecordExample example){
	    return userDealRecordMapper.selectByExample(example);
	}
}
